@extends("agent.layouts.main")
<style>
    .img{
		width:15px;
		height:15px;
		border:1px solid gray;
		border-radius: 50%;
    }
    .clearfix>span:not(:last-child){
		border-right:1px solid gray;
		color:gray;
    }
    a:hover{
        text-decoration: none !important;
    }
</style>
@section("content")
<div class="container-fiuld p-3">
    <div class="card">
		<div class="card-header bg-transparent border-0"></div>
		<div class="card-body" style="background-color: #F0F2F5">
			<div class="row pt-5 mb-5 pb-5 bg-white">
				<div class="col-lg-12">
					<form class="form-inline">
						<label>关键词:</label>
						<input type="keyword" class="ml-4 mr-5 form-control" id="keyword" name="keyword" placeholder="请选择">
						<a class="btn btn-primary ml-1 mr-3 search text-white">查询</a>
					</form>
				</div>
			</div>
			@foreach($aunnoung as $v)
			<div class="row bg-white pt-5 pb-3 border border-secondary border-top-0 border-left-0 border-right-0">
				<div class="col-lg-12">
					<div class="clearfix">
                        <p class="text-danger h4 float-left"><a href="{{ route('aunndetails', ['id' => $v['id']]) }}">{{$v->title}}</a></p>
                        <span class="float-right mt-3">{{$v->created_at}}</span>
                    </div>
					<p>{!! $v->content !!}</p>
				</div>
			</div>
			@endforeach
		</div>
	<div style="text-align: right;">
		{{ $aunnoung->links('agent.layouts.paginate') }}
	</div>
    </div>
</div>
@endsection
@section("js")
<script type="text/javascript">
    layui.use(['form', 'ori', "laydate"], function () {
        var form = layui.form,
            ori = layui.ori,
            dialog = layui.dialog,
            $ = layui.$
        $('.search').click(function () {
            var keyword = $("#keyword").val();
            location.href = "{{ route('aunnoung') }}" +'?keyword=' +keyword;
        });
    });
</script>
@endsection
